import request from '@/utils/request'

// 查询附件上传列表
export function listUpload(query) {
  return request({
    url: '/task/upload/list',
    method: 'get',
    params: query
  })
}

// 查询附件上传详细
export function getUpload(id) {
  return request({
    url: '/task/upload/' + id,
    method: 'get'
  })
}

// 新增附件上传
export function addUpload(data) {
  return request({
    url: '/task/upload',
    method: 'post',
    data: data
  })
}

// 修改附件上传
export function updateUpload(data) {
  return request({
    url: '/task/upload',
    method: 'put',
    data: data
  })
}

// 删除附件上传
export function delUpload(id) {
  return request({
    url: '/task/upload/' + id,
    method: 'delete'
  })
}

// 导出附件上传
export function exportUpload(query) {
  return request({
    url: '/task/upload/export',
    method: 'get',
    params: query
  })
}

//查询关联任务ID附件上传信息列表
export function getContractIdList(id) {
  return request({
    url: '/task/upload/byContractIdList?id='+id,
    method: 'get'
  })
}

//通过projectId查询附件上传信息列表
export function getProjectIdList(id) {
  return request({
    url: '/task/upload/byProjectIdList?id='+id,
    method: 'get'
  })
}